// import com.alibaba.druid.sql.ast.SQLDataTypeImpl;
// import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "OracleDataTypeIntervalYear.h"
#include "../visitor/OracleASTVisitor.h"
#include "../../../visitor/SQLASTVisitor.h"
#include "../../../../utils/listTran.h"

OracleDataTypeIntervalYear::OracleDataTypeIntervalYear()
{
  this->setName(make_string_ptr("INTERVAL YEAR"));
}

// @Override
void OracleDataTypeIntervalYear::accept0(SQLASTVisitor_ptr visitor)
{
  this->accept0(std::dynamic_pointer_cast<OracleASTVisitor>(visitor));
}

// @Override
void OracleDataTypeIntervalYear::accept0(OracleASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(OracleDataTypeIntervalYear)))
  {
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLExpr, SQLObject>(getArguments());
    acceptChild(visitor, tmp1);
  }
  visitor->endVisit(SharedObject(OracleDataTypeIntervalYear));
}

SQLObject_ptr OracleDataTypeIntervalYear::clone()
{
  SQLObject_ptr clone_tmp = std::shared_ptr<OracleDataTypeIntervalYear>(new OracleDataTypeIntervalYear());
  std::shared_ptr<OracleDataTypeIntervalYear> x = std::dynamic_pointer_cast<OracleDataTypeIntervalYear>(clone_tmp);
  // OracleDataTypeIntervalYear x = new OracleDataTypeIntervalYear();

  SQLDataTypeImpl::cloneTo(x);

  return x;
}
